//------------------------------------------------------------------------------
//此代码由工具生成
//请使用partial类进行扩展,避免修改被覆盖
//createTime:2023-12-25 15:48:35
//------------------------------------------------------------------------------
using System.Linq.Expressions;
using System;
using System.Collections.Generic;
using System.Linq;
using XKPlatform.DataModels.Dao.BaseDao;
using XKPlatform.DataModels.Dao.BaseEntity;
using XKPlatform.DataModels;
using XKPlatform.IService;
using FreeSql;
namespace XKPlatform.Service
{
    public partial class SysRoleService :BaseFreeSqlDao<SysRole>, ISysRoleService
    {
            public bool AddModel(SysRole model)
            {
                return InsertAffrows(model) > 0;
            }

            public bool BatchSave(List<SysRole> models)
            {
                return BatchInsert(models) > 0;
            }

            public (List<SysRole> list, long count) GetList(Expression<Func<SysRole, bool>> where, List<SortInfo<SysRole, object>> orderbys = null, PageInfo pageInfo = null)
            {
                return Query(where, orderbys, pageInfo);
            }

            public (List<SysRole> list, long count) GetListByTbName(Expression<Func<SysRole, bool>> where,string tbName, List<SortInfo<SysRole, object>> orderbys = null, PageInfo pageInfo = null)
            {
                return Query(where, tbName,orderbys, pageInfo);
            }

            public SysRole GetModel(Expression<Func<SysRole, bool>> where)
            {
                return GetByOne(where);
            }

            public bool UpdateModel(SysRole model, Expression<Func<SysRole, bool>> where, Expression<Func<SysRole, object>> IgnoreLmbad = null)
            {
                return Update(model, where, IgnoreLmbad);
            }
            public IUpdate<SysRole> UpdateBySets(Expression<Func<SysRole, bool>> where)
            {
                return this.UpdateBySet(where);
            }
    }
}
